package com.yztc.ui.cook.categoryinfo;

import android.util.Log;
import android.widget.TextView;

import com.yztc.bean.cook.CategoryInfoBean;
import com.yztc.bean.cook.CookbooklistBean;
import com.yztc.chunboapp.R;
import com.yztc.ui.cook.CookUrlConfig;
import com.yztc.ui.cook.jiekou.CookOnloadListener3;

import java.util.List;

/**
 * Created by Administrator on 2016/10/10.
 */

public class CategoryInfoPresenter implements  CategoryInfoConstract.Presenter {
    private CategoryInfoConstract.View view;
    private CategoryInfoConstract.Modle modle;
    private TextView tv_toolbar_category;
    public CategoryInfoPresenter(CategoryInfoConstract.View view){
        this.view=view;
        modle=new CategoryInfoModle();
    }
    @Override
    public void getCategoryInfo() {
        modle.getCategoryInfo(CookUrlConfig.BASE_URL, new CookOnloadListener3() {

            @Override
            public void onSuccess(CategoryInfoBean categortInfoBean) {
                view.onCategoryInfoSuccess(categortInfoBean);
            }

            @Override
            public void onFailure(Throwable e) {
                view.onCategoryInfoFail(e);
            }
        });
    }
}
